package errpkg

import (
	errors2 "github.com/pkg/errors"
)

type StackTracer interface {
	StackTrace() errors2.StackTrace
}



func WithStackOnce(err error) error {

	_, ok := err.(StackTracer)
	if ok {
		return err
	}

	return errors2.WithStack(err)
}
